package com.eascs.admin.o2o.internal.util;

import java.util.Date;

import org.springframework.stereotype.Component;

import com.eascs.web.sso.User;
import com.eascs.web.sso.UserHolder;

/**
 * 用户信息、时间
 * @author ycz
 *
 */
@Component
public class BaseUserUtil {
	public Date createTime;
	public String createOr;
	public Date updateTime;
	public String updateOr;
	public String userName;
	
	public Date getCreateTime() {
		return getCurrentDate();
	}
	public String getCreateOr() {
		return getUser().getNo();
	}
	public Date getUpdateTime() {
		return getCurrentDate();
	}
	public String getUpdateOr() {
		return  getUser().getNo();
	}
	public Date getCurrentDate(){
		return new Date();
	}
	public String getUserName() {
		return getUser().getCname();
	}
	public User getUser() {
		return UserHolder.getUser();
	}
}
